import {actionTypes} from './index'
import {fromJS} from 'immutable'

const defaultState = fromJS({
    btnTextId: 'submitBtnText',
    loading: false,
})
export default (state = defaultState, action) => {
    switch (action.type) {
        case actionTypes.ACTIVATE_LOADING:
            return state.merge(action.value)
        case actionTypes.CLOSE_LOADING:
            return state.merge(action.value)
        default:
            return state
    }
}
